//
//  UILabel+BoundRect.m
//  diaoyuren
//
//  Created by 钓鱼人 on 16/2/16.
//  Copyright © 2016年 game. All rights reserved.
//

#import "UILabel+BoundRect.h"

@implementation UILabel (BoundRect)



-(CGRect)boundingRectWithInitSize:(CGSize)size

{
    self.lineBreakMode=NSLineBreakByWordWrapping;
    
    CGRect rect=[self.text boundingRectWithSize:size options:NSStringDrawingUsesLineFragmentOrigin attributes:[NSDictionary dictionaryWithObjectsAndKeys:self.font,NSFontAttributeName, nil] context:nil];
    return rect;
    
}


@end
